package com.inno.auth.common.enums;

import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

/**
 * @author sean
 */
@Getter
public enum FeedbackStatusEnum {
    /**
     *  "1" 已修复
     *  "2" 回绝
     */
    WAIT("0", "待处理"),
    REPAIR("1", "已修复"),
    REJECT("2", "已拒绝");

    private final String code;
    private final String desc;

    FeedbackStatusEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDescByCode(String code) {
        for (FeedbackStatusEnum value : FeedbackStatusEnum.values()) {
            if (value.getCode().equals(code)) {
                return value.getDesc();
           }
        }
        return StringUtils.EMPTY;
    }
}
